package com.example.springcloudorderserver1030.config;

import com.example.springcloudorderserver1030.annotation.NoScan;
import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 温伟雄
 * @Date: 2021/10/12/17:58
 * @Description:
 */
@Configuration
@NoScan //自定义的一个空标签，用来防止@SpringBootApplication扫描到该类
public class RibbonConfig {

    @Bean
    public IRule randomRule(){
        return new RandomRule();
    }
}
